#ifndef _AvlTree_H
#include <stdlib.h>
#define ElementType int
struct AvlNode;
typedef struct AvlNode *AvlTree;
typedef struct AvlNode *Position;

AvlTree MakeEmpty(AvlTree T);
Position Find(ElementType X, AvlTree T);
Position FindMin(AvlTree T);
Position FindMax(AvlTree T);
AvlTree Insert(ElementType X, AvlTree T);
AvlTree Delete(ElementType X, AvlTree);
ElementType Retrieve(Position P);
void Print(AvlTree T);

#endif
struct AvlNode
{
    ElementType Element;
    AvlTree Left;
    AvlTree Right;
    int Height;
};